package io.seata.samples.zk.storage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.seata.samples.zk.storage.entity.TStorage;
import org.apache.ibatis.annotations.Param;

/**
 * Mapper 接口
 *
 * @author Administrator
 */
public interface TStorageMapper extends BaseMapper<TStorage> {
    /**
     * 扣减商品库存
     *
     * @param commodityCode 商品code
     * @param count         扣减数量
     * @return int
     */
    int decreaseStorage(@Param("commodityCode") String commodityCode, @Param("count") Integer count);
}
